#include "renderer.h"
#include "rendertypes.h"
#include "boundingBox.h"
#include "Entity3d.h"
//#include <assimp\Importer.hpp>
//#include <assimp\scene.h>
//#include "pg2_indexbuffer.h"

//struct aiScene;

struct IDirect3DTexture9;

struct aiMesh;

namespace ns
{
	class IndexBuffer;
	class VertexBuffer;

	class ENGINE_API Mesh : public Entity3d{
	public:
		Mesh(aiMesh* mesh,Renderer* renderer);
		virtual void Draw();
		int GetVertexAmmount();
		TextureVertex* GetVertices();
		void SetTexture(LPCSTR path);
		void SetVertices(TextureVertex* v);
		void SetRenderer(Renderer* r);
		void SetBoundingBox(BoundingBox* box);
		void SetIndexBuffer(IndexBuffer* ib);
		void SetVertexBuffer(VertexBuffer* vb);

	private:
		int vertexAmmount;
		//const aiScene* scene;
		TextureVertex* vertices;
		Renderer* renderer;

		IndexBuffer* indexBuffer;
		VertexBuffer* vertexBuffer;

		BoundingBox* bBox;
		VertexBuffer* bBoxVB;
		IndexBuffer* bBoxIB;
		IDirect3DTexture9* texture;

		bool hasTexture;
	};
}
